/* 重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto Mono', monospace;
}

body {
    background-color: #0a0a16;
    color: #00eeff;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* 动态网格背景 */
.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 238, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 238, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

/* 扫描线效果 */
.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to bottom, transparent, #00eeff, transparent);
    z-index: -1;
    animation: scan 3s linear infinite;
    opacity: 0.7;
}

@keyframes scan {
    0% { top: 0; }
    100% { top: 100%; }
}

/* 毛刺效果覆盖层 */
.glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(10, 10, 22, 0.9), rgba(0, 30, 60, 0.9));
    z-index: -1;
    opacity: 0.05;
}

/* 主容器 */
.cyber-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* 主标题样式 */
.main-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    border-bottom: 2px solid #00eeff;
    position: relative;
}

.main-header::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 10%;
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00eeff, #ff00ff, #00eeff, transparent);
}

.cyber-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 3.5rem;
    letter-spacing: 3px;
    margin-bottom: 10px;
    text-shadow: 0 0 10px #00eeff, 0 0 20px #00eeff;
    position: relative;
}

.glitch {
    position: relative;
}

.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff00ff;
    animation: glitch-1 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: 2px 0 #00ffaa;
    animation: glitch-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-1 {
    0% { clip-path: inset(20% 0 50% 0); }
    100% { clip-path: inset(80% 0 10% 0); }
}

@keyframes glitch-2 {
    0% { clip-path: inset(10% 0 60% 0); }
    100% { clip-path: inset(70% 0 20% 0); }
}

.cyber-subtitle {
    font-size: 1.2rem;
    color: #a0a0ff;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.status-bar {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.status-item {
    font-size: 0.9rem;
    color: #a0a0ff;
    padding: 8px 15px;
    background: rgba(0, 30, 60, 0.7);
    border-radius: 4px;
    border-left: 3px solid #00eeff;
}

.status-active, .status-secure {
    color: #00ff88;
    font-weight: bold;
}

/* 搜索区域 */
.search-section {
    background: rgba(0, 20, 40, 0.7);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 238, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 238, 255, 0.2);
}

.cyber-input-group {
    display: flex;
    margin-bottom: 15px;
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #00eeff;
    font-size: 1.2rem;
}

.cyber-input {
    flex: 1;
    padding: 15px 15px 15px 45px;
    background: rgba(5, 15, 30, 0.9);
    border: 1px solid #00eeff;
    color: #00eeff;
    font-size: 1rem;
    border-radius: 4px 0 0 4px;
    outline: none;
    transition: all 0.3s;
}

.cyber-input:focus {
    box-shadow: 0 0 10px #00eeff;
    background: rgba(10, 25, 50, 0.9);
}

.cyber-button {
    padding: 15px 25px;
    background: linear-gradient(45deg, #0066cc, #00aaff);
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
    transition: all 0.3s;
    font-size: 1rem;
}

.cyber-button:hover {
    background: linear-gradient(45deg, #00aaff, #00eeff);
    box-shadow: 0 0 15px #00aaff;
}

.quick-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 10px 20px;
    background: rgba(0, 40, 80, 0.7);
    border: 1px solid #00aaff;
    color: #00eeff;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn:hover {
    background: rgba(0, 80, 160, 0.7);
    box-shadow: 0 0 10px #00aaff;
}

/* 分类导航 */
.categories {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.category {
    padding: 12px 25px;
    background: rgba(0, 30, 60, 0.7);
    border: 1px solid #00aaff;
    color: #a0a0ff;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    font-weight: 500;
}

.category:hover {
    background: rgba(0, 60, 120, 0.7);
    transform: translateY(-3px);
}

.category.active {
    background: linear-gradient(45deg, #0066cc, #00aaff);
    color: white;
    box-shadow: 0 0 15px #00aaff;
    border-color: #00eeff;
}

/* 链接网格 */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.site-card {
    background: rgba(5, 15, 30, 0.8);
    border-radius: 8px;
    padding: 25px 20px;
    border: 1px solid rgba(0, 238, 255, 0.3);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.site-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 238, 255, 0.2), transparent);
    transition: left 0.5s;
}

.site-card:hover::before {
    left: 100%;
}

.site-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 238, 255, 0.3);
    border-color: #00eeff;
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.card-icon {
    width: 50px;
    height: 50px;
    background: rgba(0, 40, 80, 0.7);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.8rem;
    color: #00eeff;
    border: 1px solid rgba(0, 238, 255, 0.5);
}

.card-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #00eeff;
    margin-bottom: 5px;
}

.card-category {
    font-size: 0.85rem;
    color: #a0a0ff;
    background: rgba(0, 30, 60, 0.7);
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
}

.card-description {
    color: #b0b0ff;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.visit-btn {
    padding: 8px 15px;
    background: rgba(0, 60, 120, 0.7);
    border: 1px solid #00aaff;
    color: #00eeff;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.visit-btn:hover {
    background: rgba(0, 100, 200, 0.7);
    box-shadow: 0 0 10px #00aaff;
}

.delete-btn {
    padding: 8px 12px;
    background: rgba(100, 0, 0, 0.7);
    border: 1px solid #ff5555;
    color: #ff8888;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.delete-btn:hover {
    background: rgba(150, 0, 0, 0.7);
    box-shadow: 0 0 10px #ff5555;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 5, 10, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cyber-modal {
    background: rgba(5, 15, 30, 0.95);
    width: 90%;
    max-width: 700px;
    border-radius: 10px;
    border: 2px solid #00eeff;
    box-shadow: 0 0 30px rgba(0, 238, 255, 0.5);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 30, 60, 0.9);
    border-bottom: 1px solid #00eeff;
}

.modal-header h2 {
    color: #00eeff;
    font-family: 'Orbitron', sans-serif;
}

.close-modal {
    background: transparent;
    border: none;
    color: #00eeff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.close-modal:hover {
    color: #ff00ff;
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
}

.input-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.input-group {
    flex: 1;
}

.input-group label {
    display: block;
    color: #00eeff;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.input-group.full-width {
    flex: 100%;
}

textarea.cyber-input {
    min-height: 100px;
    resize: vertical;
}

.modal-footer {
    padding: 20px;
    background: rgba(0, 20, 40, 0.9);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.cyber-button.secondary {
    background: linear-gradient(45deg, #555555, #888888);
}

.cyber-button.secondary:hover {
    background: linear-gradient(45deg, #777777, #aaaaaa);
    box-shadow: 0 0 15px #888888;
}

/* 控制面板 */
.control-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
}

.time-display {
    background: rgba(0, 20, 40, 0.8);
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #00eeff;
    text-align: right;
}

#current-time {
    font-size: 1.3rem;
    color: #00ff88;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    display: block;
}

#current-date {
    font-size: 0.9rem;
    color: #a0a0ff;
}

.control-buttons {
    display: flex;
    gap: 10px;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 30, 60, 0.8);
    border: 1px solid #00eeff;
    color: #00eeff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.control-btn:hover {
    background: rgba(0, 60, 120, 0.9);
    transform: scale(1.1);
    box-shadow: 0 0 15px #00eeff;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .links-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .cyber-title {
        font-size: 2.5rem;
    }
    
    .links-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }
    
    .status-bar {
        gap: 10px;
    }
    
    .input-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .control-panel {
        position: static;
        margin-top: 30px;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .cyber-title {
        font-size: 2rem;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .cyber-input-group {
        flex-direction: column;
    }
    
    .cyber-button {
        border-radius: 4px;
        margin-top: 10px;
    }
    
    .categories {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }
}